package com.chaopei.day09;

/**
 * @Author Corday 天涯
 * @Date 2022/3/15 11:04
 * 测试一下多线程间的通信
 */
public class TestAccount {
    public static void main(String[] args) {
//  创建共享资源对象
     Account acc = new Account();
//   创建子线程对象
     ConsumerThread ct = new ConsumerThread(acc);
     ProduceThread pt = new ProduceThread(acc);
     Thread cons = new Thread(ct);
     Thread prod = new Thread(pt);
     cons.start();
     prod.start();
    }//main
}
